package com.chen.type;

public class TypeDemo2 {
    public static void main(String[] args) {
        // 目标，理解表达式的自动类型提升

        int result = calc2((byte)110, (byte)120);
        System.out.println(result);

    }

    //需求，接受各种类型的数据运算
    public static double calc(int a, int b, double c, char d) {
        return a + b + c + d;
    }


    public static int calc2(byte a, byte b){
        return a + b;
    }



    /*
     * public static int calc3(byte a, byte b){
        byte c = (byte)(a + b); // 强转
        return a + b;
    }
     */
}
